﻿using DidaCode.Workflow.Models;
using DidaCode.Workflow.Models.Parameters;
using DidaCode.Workflow.Models.Results;
using DidaCode.Workflow.NodeAttribute;
using DidaCode.Workflow.NodeBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DidaCode.Workflow.Nodes
{
    [NodeType(Node.SingleHotelConvert)]
    public class SingleHotelConvert : NodeBase<string, string>
    {

        public SingleHotelConvert(string switchConfig) : base(switchConfig)
        {

        }




        protected override async Task<NodeResult<string>> ExecuteNodeAsync(ExecutionContext<string, string> hotelSearch)
        {
            await Task.Delay(100); // 模拟异步操作
            Console.WriteLine("SingleHotelConvert Success");
            var result = hotelSearch.Input + "_Convert";
            return NodeResult<string>.SuccessNode(result);
        }

    }
}
